#include <iostream>
#include <cassert>
#include <vector>
#include <algorithm>
#include <sstream>
#include <list>
#include <stack>
#include <queue>
#include <map>
using namespace std;

struct ListNode {
     int val;
     ListNode *next;
     ListNode() : val(0), next(nullptr) {}
     ListNode(int x) : val(x), next(nullptr) {}
     ListNode(int x, ListNode *next) : val(x), next(next) {}
};
//打印链表
void displayList(ListNode *p){
    while( p ){
        cout<< p->val ;
        p = p->next;
        if(p) cout<<"->";
    }
    cout<<endl;
}

//解决方案类
class Solution {
public:
    double myPow(double x, int n) {
        double rt = 1;
        for(int i =n; i !=0 ; i = i/2,x *=x) rt= i%2 ? rt*x : rt;
        return n<0 ? 1.0/rt : rt ;
    }
};
int main(){
    Solution sp;
    cout<<sp.myPow(0.001,27)<<endl;
    return 0;
}